package com.leyou.item.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leyou.item.dto.SkuDTO;
import com.leyou.item.dto.SpuDTO;
import com.leyou.item.dto.SpuDetailDTO;
import com.leyou.item.entity.Sku;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


public interface SkuService extends IService<Sku> {
    //根据id批量查询sku
    List<SkuDTO> querySkuListByIds(List<Long> ids);

    //根据spuID查询sku的集合
    List<SkuDTO> querySkuListBySpuID(Long spuID);

    //商品减库存
    void subtractStock(Map<Long, Integer> cartsMap);
}
